#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int n;
bool isprime[65006];
void answer(bool normal) {
  if(normal) cout << n << " is normal.\n";
  else cout<<"The number "<<n<< " is a Carmichael number.\n";
}
void sieve() {
  fill(isprime, isprime+sizeof(isprime)/sizeof(bool), true);
  isprime[0]=isprime[1]=false;
  for(int i=2; i<=65000; ++i)
    if(isprime[i])
      for(int j=i*2; j<=65000; j+=i)
        isprime[j]=false;
}
ll mod_pow(ll x, ll n, ll mod) {
  ll res = 1;
  while(n>0) {
    if(n&1) res=res*x%mod;
    x = x*x%mod;
    n>>=1;
  }
  return res;
}
void check() {
  if(isprime[n]) {
    answer(true);
    return;
  }
  bool all = true;
  for(ll i=2; i<n; ++i) {
    if(mod_pow(i, n, n)!=i) {
      all=false;
    }
  }
  answer(!all);
}
int main() {
  ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
  sieve();
  while(cin>>n&&n) {
    check();
  }
  return 0;
}
